package gdca.webservice.common;

import java.io.IOException;
import java.util.Properties;

public class GdcaProperties {

	private static Properties properties = null;

	private static synchronized void load() throws Exception {
		if (properties == null) {
			try {
				properties = new Properties();
				properties.load((GdcaProperties.class).getResourceAsStream("/gdcaProperty.properties"));
			} catch (IOException ex) {
				properties = null;
				throw new Exception("gdcaProperty.properties错误", ex);
			}
		}
	}

	private GdcaProperties() {
	}

	public static String getProperties(String name) throws Exception {
		load();
		String value = properties.getProperty(name);
		return value;
	}

}
